/*
 * @Author: Superficial
 * @Date: 2021-03-04 09:26:33
 * @LastEditTime: 2021-03-04 09:28:22
 * @Description: 剪切板
 */

export const read = () => navigator.clipboard.readText()
export const copy = (text) => {
  window.$isCopyFromApp = true
  navigator.clipboard.writeText(text).finally(() => {
    window.$isCopyFromApp = false
  })
}

export default { copy, read };